package model

import (
	"gorm.io/gorm"
	"time"
)

type User struct {
	ID        uint           `gorm:"primaryKey;column:id;autoIncrement;comment:主键"`
	Name      string         `gorm:"column:name1;size:100;default:'';not null;comment:名称"`
	Email     string         `gorm:"column:email;size:100;default:'';not null;comment:邮箱"`
	Phone     string         `gorm:"column:phone;size:20;default:'';not null;comment:电话"`
	CreatedAt time.Time      `gorm:"column:created_at;comment:创建时间"`
	UpdatedAt time.Time      `gorm:"column:updated_at;comment:更新时间"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;comment:删除时间"`
	Status    uint8           `gorm:"column:status;default:1;not null;comment:状态"`
}

func (User) TableName() string {
	return "user"
}
